# -*- coding: utf-8 -*-
from django.contrib import admin
from opengov.govtrack.models import *

class SFSReferensAdmin(admin.ModelAdmin):
	search_fields = ['rubrik', 'sfsnummer']

class UtredningAdmin(admin.ModelAdmin):
	search_fields = ['rubrik', 'nummer']
	list_display = ('nummer', 'rubrik', 'departement')
	list_filter = ('departement',)

class BetankandeAdmin(admin.ModelAdmin):
	search_fields = ['rubrik', 'nummer']
	list_display = ('nummer', 'rubrik', 'utredning')

class CelexReferensAdmin(admin.ModelAdmin):
	search_fields = ['rubrik', 'celexnummer']
	list_display = ('celexnummer', 'rubrik')

class KommittedirektivAdmin(admin.ModelAdmin):
	search_fields = ['rubrik', 'sammanfattning']
	list_display = ('dir_nr', 'rubrik')
	list_filter = ('departement',)
	
class CrawlItemAdmin(admin.ModelAdmin):
	search_fields = ['nummer', 'klass']
	list_display = ('nummer', 'klass')

admin.site.register(Kommittedirektiv, KommittedirektivAdmin)
admin.site.register(Departement)
admin.site.register(Proposition)
admin.site.register(CelexReferens, CelexReferensAdmin)
admin.site.register(SFSReferens, SFSReferensAdmin)
admin.site.register(Topic)
admin.site.register(Utredning, UtredningAdmin)
admin.site.register(Betankande, BetankandeAdmin)
admin.site.register(CrawlItem, CrawlItemAdmin)
